<script setup>
import {baseStore} from "@/store/baseStore.js";
import enUS from 'ant-design-vue/locale/en_US';
import zhCN from 'ant-design-vue/locale/zh_CN';
import 'dayjs/locale/zh-cn';
import {onMounted, watch} from "vue";

let bs = baseStore()
let {localState, getLocalState} = storeToRefs(bs)
const {locale} = useI18n();

onMounted(() => {
    zhCN.name = 'zh'
    localState.value = getLocalState.value ? getLocalState.value : zhCn
    locale.value = localState.value.name
})

watch(localState, (newValue, oldValue) => {
    locale.value = newValue.name
})
</script>

<template>
<!--    <el-config-provider :locale="localState">-->
        <router-view></router-view>
<!--    </el-config-provider>-->
</template>

<style scoped>

</style>
